package com.huangzhao.gulimall.auth.feign;

import com.huangzhao.gulimall.auth.vo.SocialUser;
import com.huangzhao.gulimall.auth.vo.UserLoginVo;
import com.huangzhao.gulimall.auth.vo.UserRegisterVo;
import com.huangzhao.gulimall.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(value = "gulimall-member")
public interface MemberFeignService {
    /**
     * 注册
     *
     * @return R
     */
    @RequestMapping("/member/register")
    R register(@RequestBody UserRegisterVo vos);

    @PostMapping(value = "/member/login")
    R login(@RequestBody UserLoginVo vo);

    @PostMapping(value = "/member/oauth2/login")
    R oauthLogin(@RequestBody SocialUser socialUser) throws Exception;

}
